import Vuex from 'vuex';
import Vue from 'vue';

Vue.use(Vuex)

const store = new Vuex.Store({
	state:{
		account:"",
		nickName:"",//数据库里的nick_name
		userType:""
	},
	mutations:{
		setAccount:(state,value) =>{
			state.account=value
		},
		setNickName:(state,value) => {
			state.nickName=value
		},
		setUserType:(state,value) => {
			state.userType=value
		},
	},
	actions:{
		
	},
	getters:{
		account: (state) => state.account,
		nickName: (state) => state.nickName,
		userType: (state) => state.userType
	}
})

export default store
